import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('@/components/layout/index.vue'),
    redirect: '/index',
    children: [
      {
        path: '/index',
        name: 'Index',
        component: () => import('@/views/index/index.vue')
      }, {
        path: '/tabconfig',
        name: 'tabConfig',
        component: () => import('@/views/systemconfig/tableconfig.vue')
      }, {
        path: '/user/list',
        name: 'userList',
        component: () => import('@/views/user/list.vue')
      }, {
        path: '/recharge/list',
        name: 'rechargeList',
        component: () => import('@/views/recharge/index.vue')
      }, {
        path: '/design/list',
        name: 'designList',
        component: () => import('@/views/design/list.vue')
      }, {
        path: '/swiper/list',
        name: 'swiperList',
        component: () => import('@/views/swiper/list.vue')
      }, {
        path: '/customer/list',
        name: 'customerList',
        component: () => import('@/views/customer/list.vue')
      }


    ],
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login.vue')
  }


]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router